package com.imoresoft.agile.builder;

import com.ambitor.grass.sql.dao.SuperDao;
import com.ambitor.grass.util.data.IData;

public class ModuleBuilderFactory {

	public static IModuleBuilder instance(SuperDao superDao, IData userData,
			IData userStyle, String installPlace, String title)
			throws Exception {
		int templetId = userStyle.getInt("TEMPLET_ID");
		IModuleBuilder moduleBuilder = null;
		switch (templetId) {
		case 1: {
			moduleBuilder = new ModuleBuilder1(superDao, userData, userStyle,
					installPlace, title);
			break;
		}
		case 2: {
			moduleBuilder = new ModuleBuilder1(superDao, userData, userStyle,
					installPlace, title);
			break;
		}
		default:
			moduleBuilder = new ModuleBuilder1(superDao, userData, userStyle,
					installPlace, title);
			break;
		}
		return moduleBuilder;
	}
}
